cmake_minimum_required(VERSION 3.17)
project(opencv_learning)

set(CMAKE_CXX_STANDARD 14)

add_executable(opencv_learning opencv_learning.cpp video_learning.cpp)

# Where to find OpenCV

set(OpenCV_DIR "D:\\software\\opencv\\opencv\\mingw64-build\\install")

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIRS}
        video_learning.h
        )

# add libs you need

set(OpenCV_LIBS opencv_core opencv_imgproc opencv_highgui opencv_imgcodecs)

# linking

target_link_libraries(opencv_learning ${OpenCV_LIBS})